Script introduction
Find in the following lines the code corresponding to the analysis of the article: Quantifying spatiotemporal connectivity: a methodological approach based on high frequency monitoring of surface water from river networks.
All the suplementary material images, original scripts and used functions can be found in:
Article DOI:
Direct link: https://github.com/Cunillera-Montcusi/
To properly follow the following steps we recommend to read Methods section of the article:
The script of the function spat_temp_index can be found in the following repository and supplementary material
Link to the functions spat_temp_index: Link to supplementary material:
# Load functions to run the all the simulations
setwd("C:/Users/David CM/Dropbox/DAVID DOC/LLAM al DIA/1. FEHM coses al DIA/4. Mecodispers Spa-Tem/MECODISPER SpaTem")
source("SpaTemp_HOBOS_function.R")
Initial steps - Loading and correcting data loggers information, localization
1. Charging & depurating HOBOS Dataset
The initial step is to charge the datasets containing the names of each monitored site containing the stream name, the ID code and the latitude and longitude. This dataset will be used to localize each one of the data loggers along the river (the “Longlat_Rius.csv” can be found in the repository - LINK)
The following step is to upload the HOBOS_sites information, which corresponds to the A) Water permanence database (Figure 1). We upload individually the tables for each stream (one sheet for each stream). These “.csv” documents can be found in the online repository - LINK and contain the information about each daily wet/dry status of each stream.